package me.sunpeng.design.factory.factorymethod.pizzastore.order;

import me.sunpeng.design.factory.factorymethod.pizzastore.pizza.BJCheesePizza;
import me.sunpeng.design.factory.factorymethod.pizzastore.pizza.BJPepperPizza;
import me.sunpeng.design.factory.factorymethod.pizzastore.pizza.Pizza;

/**
 * bj 披萨工厂
 * @author sp
 */
public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String orderType) {

        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new BJCheesePizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
